/*
 * @Author: deng da chao
 * @Date: 2022-08-13 14:23:52
 * @LastEditTime: 2023-03-22 14:03:17
 * @Description: 活动相关接口
 */
import http from '../../utils/http'

//邀请进度
const getSysMemberInviteProgress = (data) => {
  return http.get(`/member/sysMember/inviteProgress`, data)
}

// 获取榜单数据
const getSysMemberGetBillboard = (data) => {
  return http.get(`/member/sysMember/getBillboard`, data)
}

// 获取好友列表 0 全部 1 未激活 2 已激活 3已失效 4已失效已激活
const getSysMemberInviteMemberList = (data) => {
  return http.get(`/member/sysMember/inviteMemberList`, data)
}

// 我的活动奖励
const getSysMemberMyActivityPrize = (data) => {
  return http.get(`/member/sysMember/myActivityPrize`, data)
}

// 获取活动时间
const getActivityInfo = (data) => {
  return http.get(`/nft/activityInfo`, data)
}

//工业城邀新排行榜 /activity/some/industry/inviting/rank
const getActivityInvitingRank = (data) => {
  return http.get(`/activity/some/industry/inviting/rank`, data)
}


// 商品合成列表
const getNftCompoundList = (data) => {
  return http.get(`/nft/compound/list`, data)
}
// 商品合成详情
const getNftCompoundDetail = (data) => {
  return http.get(`/nft/compound/detail`, data)
}

//合成活动详情-用户可选择材料信息
const getNftCompoundDetailCanchoose = (data) => {
  return http.get(`/nft/compound/detail/canchoose`, data)
}
// 商品合成前置接口
const postNftCompoundLogCompoundBefore = (data) => {
  return http.post(`/nft/nftCompoundLog/compoundBefore`, data)
}

// 商品合成接口
const postNftCompoundLogCompoundId = (data) => {
  return http.post(`/nft/nftCompoundLog/compound`, data)
}

// 发起合成
const postNftCompoundPlace = (data) => {
  return http.post(`/nft/compound/do`, data)
}

// 商品合成记录详情
const getCompoundLogNewDetail = (data) => {
  return http.get(`/nft/compound/log/detail`, data)
}


// 商品合成记录列表
const getNftCompoundLogPageList = (data) => {
  return http.get(`/nft/nftCompoundLog/pageList`, data)
}

// 商品合成记录列表
const getCompoundLogNew = (data) => {
  return http.get(`/nft/compound/log/list`, data)
}
// 商品合成记录详情
const getNftCompoundLogDetail = (data) => {
  return http.get(`/nft/nftCompoundLog/detail`, data)
}


// 用户机器人绑定列表页
const getSysMemberRobotList = (data) => {
  return http.get(`/member/sysMemberRobot/list`, data)
}

// 修改用户机器人绑定
const putSysMemberRobotUpdate = (data) => {
  return http.put(`/member/sysMemberRobot/update`, data)
}

// 快速合成/api/v1/nft/nftCompound/fastCompoundDetail
const fastCompoundDetail = (data) => {
  return http.get(`/nft/nftCompound/fastCompoundDetail`, data)
}

// 合成详情列表
const getAlreadyDetail = (data) => {
  return http.get(`/nft/nftCompoundLog/alreadyDetail`, data)
}

// 漫谷合成
const postNftCompoundLogDragonCompound = (data) => {
  return http.post(`/nft/nftCompoundLog/dragonCompound`, data)
}

// 分页获取合成记录详情
const getCompoundLog = (data) => {
  return http.get(`/nft/nftCompoundLog/getCompoundLog`, data)
}

/*
 抽奖相关接口
*/

// 抽奖列表
const getTurntableParams = (data) => {
  return http.get(`/turntable/params`, data)
}

// 查询(id)抽奖
const getTurntableId = (data) => {
  return http.get(`/turntable/${data.id}`, data)
}


//展示活动剩余次数
const getTurntableRecordJoindLimit = (data) => {
  return http.get(`/turntable/record/joinedLimit/${data.id}/${data.userId}/${data.schemeId}`, data)
}
// 材料消耗明细
const turntableSchemes = (data) => {
  return http.get(`/turntable/schemes/${data.id}`)
}

//查看奖品数据
const turntablePrizeSchemes = (data) => {
  return http.get(`/turntable/prize/params`, data)
}

//奖池活动记录数据
const turntableRecordSchemes = (data) => {
  return http.get(`/turntable/record/record`, data)
}

//开售抽奖
const postTurntablePrizePlaceOrder = (data) => {
  return http.post(`/turntable/prize/placeOrder`, data)
}

//活动记录列表
const getTurntableRecordParams = (data) => {
  return http.get(`/turntable/record/params`, data)
}

// 礼包内容
const prizeGiftList = (data) => {
  return http.get(`/nft/prizeGiftList`, data)
}
// 礼包兑换
const prizeExchange = (data) => {
  return http.post(`/nft/prizeExchange`, data)
}

// 查询礼包详情
const prizeExchangeDetail = (data) => {
  return http.get(`/nft/prizeExchangeDetail`, data)
}

// 兑换列表
const prizeExchangePage = (data) => {
  return http.get(`/nft/prizeExchangePage`, data)
}
//活动记录详情(id)
const getTurntableRecordDetail = (data) => {
  return http.get(`/turntable/record/detail/${data.id}`, data)
}


//查询参与条件
const getTurntablePrizeJoin = (data) => {
  return http.get(`/turntable/prize/join-condition/${data.id}/${data.userId}/${data.schemeId}`, data)
}


// 查询自动收取特权
const getCheckPrivilege = (data) => {
  return http.get(`/member/sysMember/checkPrivilege/${data.userId}`, data)
}

//更改自动收取特权状态
const putModifyCollectType = (data) => {
  return http.put(`/member/sysMember/modifyCollectType`, data)
}

//获取扭蛋配置信息
const marketingGashaponConfig = (data) => {
  return http.get(`/marketing/marketingGashapon/config/${data.siteType}/${data.type}`, data)
}

// 扭蛋下单
const createGashapon = (data) => {
  return http.post(`/order/orderMain/createGashapon`, data)
}
// 扭蛋机下注
const postCreateGashapon = (data) => {
  return http.post(`/marketing/marketingGashapon/createGashapon`, data)
}

// 获取扭蛋记录
const marketingGashaponList = (data) => {
  return http.get(`/marketing/marketingGashapon/list`, data)
}
// 获取详情
const getMarketingGashapon = (data) => {
  return http.get(`/marketing/marketingGashapon/getDetails/${data.id}`, data)
}
// 随机抽取15条记录
const getDrawPrizeList = (data) => {
  return http.get(`/marketing/marketingGashapon/getDrawPrizeList/${data.id}`, data)
}

// 获取200条日志
const getMarketingGashaponGetListLog = (data) => {
  return http.get(`/marketing/marketingGashapon/getListLog`, data)
}



// 查询是否白名单
const getOpenness = (data) => {
  return http.get(`marketing/marketingGashapon/getOpenness/${data.type}`, data)
}

// 获取居民卡信息/lxc/api/v1/member/sysMemberResidentCard/getInfo
const sysMemberResidentCardGetInfo = () => {
  return http.get('member/sysMemberResidentCard/getInfo')
}

// 获取开通消耗材料/lxc/api/v1/member/sysMemberResidentCard/getConsume
const getConsume = () => {
  return http.get('member/sysMemberResidentCard/getConsume')
}

// 居民卡开通/lxc/api/v1/member/sysMemberResidentCard/activate/{type}
const activateCard = (type) => {
  return http.get(`member/sysMemberResidentCard/activate/${type}`)
}

// 获取我的好友码//photo/api/v1/distribution/manGu/appDistributionInvite/getMyInvitationCode
const myInvitationCode = () => {
  return http.get('distribution/manGu/appDistributionInvite/getMyInvitationCode')
}

// 获取好友数量xc/api/v1/distribution/distributionMemberRelation/friendCount
const friendCount = () => {
  return http.
    get('distribution/distributionMemberRelation/friendCount')
}

// 待领取资源数据/lxc/api/v1/distribution/distributionRewardLog/unclaimed
const unclaimed = () => {
  return http.
    get('distribution/distributionRewardLog/unclaimed')
}
// 发展奖统计/lxc/api/v1/distribution/distributionRewardLog/statistics
const statistics = () => {
  return http.
    get('distribution/distributionRewardLog/statistics')
}
// 获取本期推广/lxc/api/v1/marketing/marketingDistributionSettlement/getCurrent
const getCurrent = () => {
  return http.
    get('marketing/marketingDistributionSettlement/getCurrent')
}

// 获取好友列表//photo/api/v1/distribution/manGu/appDistributionInvite/friendList
const friendList = (data) => {
  return http.
    post('distribution/manGu/appDistributionInvite/friendList', data)
}
// 获取身份信息/lxc/api/v1/distribution/distributionMemberRole/getRole
const getRole = () => {
  return http.
    get('distribution/distributionMemberRole/getRole')
}
// 获取身份信息/lxc/api/v1/distribution/distributionRewardLog/details/{id}
const distributionRewardLogDetail = (data) => {
  return http.
    get(`distribution/distributionRewardLog/details/${data.id}`, data)
}

// 结算记录//lxc/api/v1/marketing/marketingDistributionSettlement/getSettlementMemberList
const getSettlementMemberList = (data) => {
  return http.
    get(`marketing/marketingDistributionSettlement/getSettlementMemberList`, data)
}
// 往期记录/photo/api/v1/distribution/appDistributionTotal/pastRecord
const pastRecord = (data) => {
  return http.
    get(`distribution/appDistributionTotal/pastRecord`, data)
}
// 领取资源//lxc/api/v1/distribution/distributionRewardLog/receive
const distributionRewardLog = (data) => {
  return http.
    get(`distribution/distributionRewardLog/receive`, data)
}

// 好友中心/photo/api/v1/distribution/manGu/appDistributionInvite/friendCenter
const friendCenter = (data) => {
  return http.
    get(`distribution/manGu/appDistributionInvite/friendCenter`, data)
}

// 结算记录/photo/api/v1/distribution/appDistributionMember/pastRecordDetailByUserId
const pastRecordDetailByUserId = (data) => {
  return http.
    post(`distribution/appDistributionMember/pastRecordDetailByUserId`, data)
}
export default {
  getSysMemberInviteProgress,
  getSysMemberGetBillboard,
  getSysMemberInviteMemberList,
  getSysMemberMyActivityPrize,
  getActivityInfo,
  getNftCompoundList,
  getNftCompoundDetail,
  getNftCompoundDetailCanchoose,
  getActivityInvitingRank,
  postNftCompoundLogCompoundBefore,
  postNftCompoundLogCompoundId,
  getNftCompoundLogPageList,
  getNftCompoundLogDetail,
  getSysMemberRobotList,
  putSysMemberRobotUpdate,
  fastCompoundDetail,
  getAlreadyDetail,
  postNftCompoundLogDragonCompound,
  getCompoundLog,
  getTurntableParams,
  getTurntableId,
  getTurntableRecordJoindLimit,
  turntableSchemes,
  turntablePrizeSchemes,
  turntableRecordSchemes,
  postTurntablePrizePlaceOrder,
  getTurntableRecordParams,
  prizeGiftList,
  prizeExchange,
  prizeExchangeDetail,
  prizeExchangePage,
  getTurntableRecordDetail,
  getTurntablePrizeJoin,
  postNftCompoundPlace,
  getCompoundLogNew,
  getCompoundLogNewDetail,
  getCheckPrivilege,
  putModifyCollectType,
  marketingGashaponConfig,
  createGashapon,
  postCreateGashapon,
  marketingGashaponList,
  getMarketingGashapon,
  getDrawPrizeList,
  getMarketingGashaponGetListLog,
  getOpenness,
  sysMemberResidentCardGetInfo,
  getConsume,
  activateCard,
  myInvitationCode,
  friendCount,
  unclaimed,
  statistics,
  getCurrent,
  friendList,
  getRole,
  distributionRewardLogDetail,
  getSettlementMemberList,
  pastRecord,
  distributionRewardLog,
  friendCenter,
  pastRecordDetailByUserId
}